package day6;

import day4.teacher.MathTeacher;

import java.util.ArrayList;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class ListTest {
    public static void main(String[] args) {
        //长度固定，查找麻烦，无法动态扩容,删除麻烦
        List list=new ArrayList();
        list.add("你好");
        list.add("柿子");
        list.add("柿子");
        list.add("柿子");
        list.add(Math.E);
        list.add(2<1);
        list.add(new MathTeacher("老吴",21));
        System.out.println(list.size());
        System.out.println(list);
        for (int i = 0; i < list.size(); i++) {
            Object obj = list.get(i);
            System.out.println(obj);
        }
        System.out.println(">>>>>>>>>>>>>>>>>>>>");
        boolean b = list.remove("柿子");
        System.out.println("删除后:");
        System.out.println(list);
    }
}
